<template>
  <div class="my-version">
    <custom-header-bar
      bg="1"
      title="检查更新"
      backStatus="1"
    ></custom-header-bar>
    <div class="content">
      <div class="item">
        <div class="label">版 本 号：</div>
        <div class="text">{{ appVersion }}</div>
      </div>
      <div class="item">
        <div class="label">更新内容：</div>
        <div class="text">{{ appUpdateContent }}</div>
      </div>
    </div>
  </div>
</template>
<script>
import CustomHeaderBar from "@/components/custom-header-bar.vue";
import { getversion } from "@/api/my";
export default {
  components: {
    CustomHeaderBar,
  },
  data() {
  	return {
  		appVersion: '',
		appUpdateContent: ''
  	};
  },
  onShow() {
  	this.getversion();
  },
  methods: {
	  // 获取版本信息
	  getversion(){
		 getversion().then((res) => {
			 // console.log(res)
		   if (res.data.code === 200) {
		     this.appVersion = res.data.data.appVersion
			 this.appUpdateContent = res.data.data.appUpdateContent
		   }
		 });
	  }
  }
};
</script>
<style lang="scss" scoped>
.my-version {
  height: 100%;
  box-sizing: border-box;
  padding: 24upx;
  padding-top: 184upx;
  background-color: #f4f4f4;
  .content {
    width: 100%;
    height: 100%;
    background-color: #fff;
    border-radius: 30upx;
    padding: 0 24upx;
    padding-top: 15upx;
    box-sizing: border-box;
  }
  .item {
    display: flex;
    padding: 20upx;
    box-sizing: border-box;
    border-bottom: 1upx solid rgba(0, 0, 0, 0.1);
    .label {
      color: rgba(0, 0, 0, 0.65);
      font-size: 28upx;
      flex-shrink: 0;
    }
    .text {
      color: #484848;
      font-size: 28upx;
    }
  }
}
</style>